#通用空对象
class NullObject < BasicObject
    def method_missing(*)
    end

    def response_to?(name)
    end

    def nil?
        true
    end
    def !
        true
    end
end

#空对象黑洞
class NullObject2
    def method_missing(*)
        self
    end
end

n = NullObject.new
puts n.nil?
puts !n
puts !!n
n2 = NullObject2.new
puts n2.nil?
puts !n2
puts !!n2